package itsm.isperp.module.repository.configuration;

import itsm.isperp.framework.data.domain.DataResponse;
import itsm.isperp.framework.data.mybatis.dao.CUDMapper;
import itsm.isperp.framework.web.request.JqGridRequest;
import itsm.isperp.module.dto.configuration.ConfCiDTO;
import itsm.isperp.module.entity.configuration.ConfCi;

import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 配置项数据库映射器
 * 
 * @author lizx
 * @date 2013-4-29
 */
@Repository
public interface ConfCiMapper extends CUDMapper<ConfCi> {

	DataResponse<Map<String, Object>> findAllDetailByRequestWithProperty(
			JqGridRequest request);
	DataResponse<Map<String, Object>> findAllDetailByRequestWithPropertyForCompany(
			JqGridRequest request);

	DataResponse<Map<String, Object>> findCiMapByRequest(JqGridRequest request);
	
	DataResponse<Map<String, Object>> findCiMapForPortalByRequest(JqGridRequest request);
	
	DataResponse<Map<String, Object>> findCiMapByRequestForCompany(JqGridRequest request);

	DataResponse<ConfCi> findCiByRequest(JqGridRequest request);
	
	DataResponse<ConfCi> findSparepartAll(JqGridRequest request);
	
	DataResponse<ConfCi> findAllCompayCiByRequest(JqGridRequest request);
	
	DataResponse<ConfCiDTO> findByProperty(JqGridRequest request);

	ConfCi findOneByCode(@Param("code") String code);

	DataResponse<Map<String, Object>> findCiWithPropertyMapByRequest(
			@Param("property_field") String property_field,
			@Param("property_search") String property_search,
			JqGridRequest request);
	
	DataResponse<Map<String, Object>> listSepAndModel(JqGridRequest request);

}
